#include <stdio.h>

#define N 32

void insertfunc(int *arr,int n){
    int i,j;
    int key;
    for(i=1;i<n;i++){
        key=arr[i];
        j=i-1;
        while((j>=0)&&(key<arr[j])){
            arr[j+1]=arr[j];
            j--;
        }
        arr[j+1]=key;
    }
}

int main(int argc, char const *argv[])
{
    int n;
    int arr[N]={0};
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",arr+i);
    }

    insertfunc(arr,n);
    for(int i=0;i<n;i++){
        printf("%d ",arr[i]);
    }
    putchar(10);
    return 0;
}
